import { App } from 'vue'
import 'element-plus/lib/theme-chalk/index.css'

import {
  ElButton,
  ElCard,
  ElContainer,
  ElDialog,
  ElHeader,
  ElMain,
  ElStep,
  ElSteps,
  ElTable,
  ElTableColumn,
  ElTabPane,
  ElTabs,
  ElTag,
  ElUpload
} from 'element-plus'

const components = [
  ElButton,
  ElContainer,
  ElHeader,
  ElMain,
  ElTabs,
  ElTabPane,
  ElUpload,
  ElCard,
  ElDialog,
  ElTable,
  ElTableColumn,
  ElSteps,
  ElStep,
  ElTag
]

export function registerElement(app: App): void {
  for (const cpn of components) {
    app.component(cpn.name, cpn)
  }
}
